*** Figure F1

** electronic payment brand adoption

use "$P_Data/Kent_data/kent_panel_productivity_12.dta", clear
by brand year, sort: gener n_stations = _N
by brand year: egen n_electpayment = total(electpayment)
by brand year: egen n_card = total(card)
by brand year: egen n_card_pump = total(cardpump)
by brand year: keep if _n==1

keep brand year n_stations n_electpayment n_card n_card_pump
gener share_electpayment = n_electpayment/n_stations
gener share_card = n_card/n_stations
gener share_card_pump = n_card_pump/n_stations

by year, sort: egen tot_electpayment = total(n_electpayment)
by year, sort: egen tot_card = total(n_card)
by year, sort: egen tot_card_pump = total(n_card_pump)

 tw (line share_electpayment year if brand=="SHELL")  (line share_electpayment year if brand=="ESSO")   (line share_electpayment year if brand=="PETROCANADA")  (line share_electpayment year if brand=="SUNOCO") (line share_electpayment year if brand=="PIONEER"), legend(label (1 "Shell") label(2 "Esso") label(3 "PetroCanada") label(4 "Sunoco") label(5 "Pioneer")) ytitle("Share of Adopting Stations") tline(1993) note("Vertical line represents first appearance of technology.")

gr export "$P_Figures/Figure_F1.eps", replace
